<?php
namespace haibao\erp\data\brand;

class BrandDefine extends \haibao\erp\data\BaseMysql{
	
	public function __construct(){
		parent::__construct('\haibao\erp\model\data\brand\BrandDefine');
	}
	
	public function saveBrand($brandModel){
		if($brandModel->Id){
			$this->save($brandModel);
		}else {
			$this->add($brandModel);
		}
		return $brandModel;
	}
	/**
	 * 根据品牌id修改对应的状态
	 */
	public function delBrandById($brandId){
		$this->updateById($brandId, array('Status'=>\haibao\erp\model\data\brand\BrandDefine::STATUS_DEL));
	}
}
